
#include "syscall.h"

void forkTestFastest() {
	int i = 0, j = 0;
	FPrint("Entering forkTestFastest...\n", 29, 0, 0);
	
	FPrint("forkTestFastest finished\n", 26, 0, 0);
	Exit(0);
}

void forkTest1() {
	int i = 0, j = 0;
	FPrint("Entering forkTest1...\n", 23, 0, 0);
	for(i = 0; i < 10000; i++) j++;

	FPrint("forkTest1 finished\n", 20, 0, 0);
	Exit(0);
}

void forkTest2() {
	int i = 0, j = 0;
	FPrint("Entering forkTest2...\n", 23, 0, 0);
	for(i = 0; i < 1000; i++) j++;

	FPrint("forkTest2 finished\n", 20, 0, 0);
	Exit(0);
}

void forkTest3() {
	int i = 0, j = 0;
	FPrint("Entering forkTest3...\n", 23, 0, 0);
	for(i = 0; i < 100; i++) j++;

	FPrint("forkTest3 finished\n", 20, 0, 0);
	Exit(0);
}

void forkTest4() {
	int i = 0, j = 0;
	FPrint("Entering forkTest4...\n", 23, 0, 0);
	for(i = 0; i < 10; i++) j++;

	FPrint("forkTest4 finished\n", 20, 0, 0);
	Exit(0);
}

int main() 
{
	Fork(forkTestFastest);
	Fork(forkTest1);
	Fork(forkTest2);
	Fork(forkTest3);
	Fork(forkTest4);
}
